<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>获取3个数字中的最小值</title>
</head>
<body>
    <script>
        function pd(a1,a2,a3){
            var min=a1;
            if(min>a2){
                min=a2;
            }
            if(min>a3){
                min=a3;
            }
            return min;
        }
        alert("三个数中的最小值为："+pd(16,12,17))
        document.write("三个数中的最小值为："+pd(16,12,17));
    </script>
</body>
</html>